package lab02.test20;

import java.util.Scanner;

public class Test20 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("enter a String:");

        String string = sc.next();
        StringBuffer stringBuffer = new StringBuffer();
        //程序仅仅输出字符串中的全部数字字符。
        for(int i = 0;i < string.length();i++){

            char temp = string.charAt(i);

            if(temp >= '0' && temp <= '9'){
                stringBuffer.append(temp);
            }else
                continue;
        }

        System.out.println(stringBuffer.toString());
    }
}
